#------------------------------------------------------------------------------
# Source custom modal keybindings
#------------------------------------------------------------------------------
source ~/.config/tmux/modal.tmux

#------------------------------------------------------------------------------
# Options
#------------------------------------------------------------------------------

# No gaps between windows indexes
set -g renumber-windows on

# Lock tmux with vlock
set -g lock-command vlock
set -g lock-after-time 600

# Vi mode for copy and paste
set -g mode-keys vi

# Remove esc/alt disambiguation timeout
set -sg escape-time 0

set -g set-clipboard on

#------------------------------------------------------------------------------
# Status line
#------------------------------------------------------------------------------

# Styling
set -g status-bg black
set -g status-fg white

# Simple status line
set -g status-right \
"#{?window_bigger,[#{window_offset_x}#,#{window_offset_y}] ,} %H:%M %d.%m.%y"

# Status line with battery information
# This is conditionally sourced and overwrites the above definitions
if-shell "[ -d /sys/class/power_supply/BAT0 ]" \
	"source ~/.config/tmux/battery.conf"
